Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR ports the mod to Minecraft 1.19.2.
Breaking changes:
chat_capture
event now returnsusername, message, id, capture
instead ofmessage, capture, username, id
, for consistency.ChatMixin
has been replaced with an event listener for Fabric API'sServerMessageEvents.ALLOW_CHAT_MESSAGE
.Due to changes to the way chat messages are handled and verified as of Minecraft 1.19.1, cancelling the chat message is no longer (easily) possible. Thus, fully "capturing" chat messages has been temporarily removed - other players will now see the bound player's messages regardless of whether they've been captured.
The "proper" way to fix this, in my opinion, would be to mixin to the client's
ChatScreen$sendMessage
, send a custom packet to the server containing the relevant data, and cancel the chat message client-side. An example implementation of this can be found in Botania:https://github.com/VazkiiMods/Botania/blob/1.20.x/Fabric/src/main/java/vazkii/botania/fabric/mixin/client/ChatScreenMixin.java
https://github.com/VazkiiMods/Botania/blob/1.20.x/Xplat/src/main/java/vazkii/botania/common/block/block_entity/corporea/CorporeaIndexBlockEntity.java#L380
I did not implement this fix myself, as I am lazy. Hence why this PR is a draft!